package common.config.jwt;

import lombok.Getter;

import java.util.concurrent.TimeUnit;

/**
 * 描述
 *
 * @author 米泽鹏
 * @since 2023-11-6 下午 11:15
 */
@Getter
public enum TokenEnum {

	LOGIN("loginToken", "satisfactory_login", 7L, TimeUnit.DAYS, "登录"),

	MODIFY_PASSWORD("modifyPasswordToken", "satisfactory_modify_password", 30L, TimeUnit.MINUTES, "修改密码"),

	ACTIVATE_EMAIL("activateEmailToken", "satisfactory_activate_email", 7L, TimeUnit.DAYS, "邮箱激活"),

	MODIFY_EMAIL("modifyEmailToken", "satisfactory_modify_email", 2L, TimeUnit.HOURS, "邮箱换绑");

	private final String claimName;

	private final String secret;

	private final String issuer = "magmageddon";

	private final long expire;

	private final TimeUnit timeUnit;

	private final String desc;

	TokenEnum(String claimName, String secret, long expire, TimeUnit timeUnit, String desc) {
		this.claimName = claimName;
		this.secret = secret;
		this.expire = expire;
		this.timeUnit = timeUnit;
		this.desc = desc;
	}

}
